<<template>
  <div calss="table">
      <!--表11____县生产信息调查统计表T_MulProdInfoChart-->
      <div class="divSearch">
            <Row>
                <Col span="24" class="col-margin">
                    <label class="searchLabel">所属地区:</label>
                    <!-- <Cascader :data="AreaList" change-on-select @on-change='SearchCascaderChange'  class="searchInput"></Cascader>-->
                    <Select v-model="searchModel.AreaCode"  placeholder="请选择..." style="width: 100px" @on-change="getPageData()" class="searchInput">
                       <Option :value="userinfo.AreaCode" v-if="userinfo.AreaCode=='530000000000'">全&nbsp;&nbsp;省</Option>
                        <Option :value="userinfo.AreaCode" v-else>全市/州</Option>
                        <Option :value="item.value" v-for="item in AreaList" :key="item.value">{{item.label}}</Option>
                    </Select>
                    填报年度：
                    <Select v-model="searchModel.FillInYear" placeholder="全部" style="width: 100px" @on-change="getPageData()">
                        <Option value="">全部</Option>
                        <Option :value="item.DictText" v-for="item in CreateYearList" :key="item.DictText">{{item.DictText}}</Option>
                    </Select>
                    报表状态：
                    <Select v-show="this.userinfo.AreaCode=='530000000000'&&this.userinfo.Account=='530000'" v-model="searchModel.StatusTwo" placeholder="全部" style="width: 100px" @on-change="getPageData()">
                        <Option value="">全部</Option>
                        <Option :value="item.DictValue" v-for="item in ReStatusList" :key="item.DictValue">{{item.DictText}}</Option>
                    </Select>
                    <Select v-show="this.userinfo.Account!='530000'" v-model="searchModel.Status" placeholder="全部" style="width: 100px" @on-change="getPageData()">
                        <Option value="">全部</Option>
                        <Option :value="item.DictValue" v-for="item in ReStatusList" :key="item.DictValue">{{item.DictText}}</Option>
                    </Select>
                    <Button icon="ios-search" type="ghost" @click="getPageData()" style="margin-left: 5px;background: linear-gradient(to bottom, #64c8ef 0%,#00a2e2 100%);color: #fff;border-radius: 3px;text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.3);">
                        查询
                    </Button>
                </Col>
            </Row>
      </div>
    <Row>
        <Col span="24" class="col-margin">
        <Table size="small" :height="clientHeight" border :context="ctx" :columns="columnsList" :data="datas.rows" no-data-text='暂无数据...'></Table>
        </Col>
    </Row>
    <Row>
        <Col span="24" class="dataTable">
        <Page style="float:left;margin: 5px 20px 5px 0;" class="page-style" :total="datas.total" placement="top" @on-change="getPageNumber" :page-size="searchModel.PageSize" :page-size-opts='pageSizeOpts' show-sizer @on-page-size-change="getPageSize" show-total show-elevator></Page>
        </Col>
    </Row>
    <Modal v-model="showType" :mask-closable="false" :closable="true" width="1200"  :styles="{top: '20px'}">
          <p slot="header" class="title">
            <Icon type="ios-paper" size="20"></Icon>
            <span style="font-size: 20px">{{CurrentTableName}}</span>
          </p>
          <p slot="close">
            <Icon type="close-circled" color="red" size=25></Icon>
          </p>
            <table class="reptable2" style="width:100%">
              <tr>
                  <th colspan="4" class="tableItemTitle">一、乡镇信息调查</th>
              </tr>
              <tr > 
                  <td class="tableItem">万亩以上乡（镇）数（个）</td>
                  <td>{{dataModel.NumTownship|integer|formatCurrency}}</td>
                  <td class="tableItem">分别是</td>
                  <td >{{dataModel.NumTownshipName}}</td>
              </tr>
              <tr >
                  <td class="tableItem">千亩以上村（委会）（个）</td>
                  <td >{{dataModel.NumVillage|integer|formatCurrency}}</td>
                  <td class="tableItem">分别是</td>
                  <td >{{dataModel.NumVillageName}}</td>
              </tr>
              <tr >
                  <td class="tableItem">养蚕户（户）</td>
                  <td colspan="3" >{{dataModel.MulHouseholds|integer|formatCurrency}}</td>
              </tr>
              <tr >
                  <td class="tableItem">全年养蚕量 (1)＜3张（户）</td>
                  <td >{{dataModel.AnnualSilkwormOne|integer|formatCurrency}}</td>
                  <td class="tableItem">(2)≤5张（户）</td>
                  <td >{{dataModel.AnnualSilkwormTwo|integer|formatCurrency}}</td>
              </tr>
              <tr >
                  <td class="tableItem">(3)≤10张（户）</td>
                  <td >{{dataModel.AnnualSilkwormThree|integer|formatCurrency}}</td>
                  <td class="tableItem">(4)＞10张（户）</td>
                  <td >{{dataModel.AnnualSilkwormFour|integer|formatCurrency}}</td>
              </tr>
              <tr>
                  <th colspan="4" class="tableItemTitle">二、技术人员信息调查</th>
              </tr>
              <tr >
                  <td class="tableItem">技术人员总数（人）</td>
                  <td >{{dataModel.TecPersonTotalNum|integer|formatCurrency}}</td>
                  <td class="tableItem">其中：在职在编</td>
                  <td >{{dataModel.TecPersonAllInNum|integer|formatCurrency}}</td>
              </tr>
              <tr >
                  <td class="tableItem">(1) 按性别分:男</td>
                  <td >{{dataModel.ManNum|integer|formatCurrency}}</td>
                  <td class="tableItem">女</td>
                  <td >{{dataModel.WomanNum|integer|formatCurrency}}</td>
              </tr>
              <tr >
                  <td class="tableItem">(2)按年龄分:≤30岁</td>
                  <td >{{dataModel.AgeOne|integer|formatCurrency}}</td>
                  <td class="tableItem">30-40岁</td>
                  <td >{{dataModel.AgeTwo|integer|formatCurrency}}</td>
              </tr>
              <tr >
                  <td class="tableItem">40-50岁</td>
                  <td>{{dataModel.AgeThree|integer|formatCurrency}}</td>
                  <td class="tableItem">50岁以上</td>
                  <td >{{dataModel.AgeFour|integer|formatCurrency}}</td>
              </tr>
              <tr >
                  <td class="tableItem">(3)按学历层次分:硕士及以上</td>
                  <td >{{dataModel.EduLevelOne|integer|formatCurrency}}</td>
                  <td class="tableItem">本科</td>
                  <td >{{dataModel.EduLeveTwo|integer|formatCurrency}}</td>
              </tr>
              <tr >
                  <td class="tableItem">大专</td>
                  <td >{{dataModel.EduLevelThree|integer|formatCurrency}}</td>
                  <td class="tableItem">中专（技校）</td>
                  <td >{{dataModel.EduLevelFour|integer|formatCurrency}}</td>
              </tr>
              <tr >
                  <td class="tableItem">(4)职称情况:正高</td>
                  <td>{{dataModel.TitleOne|integer|formatCurrency}}</td>
                  <td class="tableItem">副高</td>
                  <td >{{dataModel.TitleTwo|integer|formatCurrency}}</td>
              </tr>
              <tr >
                  <td class="tableItem">中职</td>
                  <td >{{dataModel.TitleThree|integer|formatCurrency}}</td>
                  <td class="tableItem">初职</td>
                  <td >{{dataModel.TitleFour|integer|formatCurrency}}</td>
              </tr>
              <tr>
                  <th colspan="4" class="tableItemTitle">三、蚕室、蚕具调查</th>
              </tr>
              <tr >
                  <td class="tableItem">1.蚕种催青室间数（间）</td>
                  <td >{{dataModel.IncuRoomNum|integer|formatCurrency}}</td>
                  <td class="tableItem">面积（m2）</td>
                  <td >{{dataModel.IncuRoomArea|formatCurrency|decimal}}</td>
              </tr>
              <tr >
                  <td class="tableItem">季催青能力（张）</td>
                  <td >{{dataModel.JiCuiqingPower|integer|formatCurrency}}</td>
                  <td class="tableItem">年催青（张）</td>
                  <td >{{dataModel.YearsOfIncu|integer|formatCurrency}}</td>
              </tr>
              <tr >
                  <td class="tableItem">2.小蚕共育点（个）</td>
                  <td >{{dataModel.SilkwormSpots|integer|formatCurrency}}</td>
                  <td class="tableItem">面积（m2）</td>
                  <td >{{dataModel.SilkwormArea|formatCurrency|decimal}}</td>
              </tr>
              <tr >
                  <td class="tableItem">季共育能力（张）</td>
                  <td >{{dataModel.QuaternaryFertility|integer|formatCurrency}}</td>
                  <td class="tableItem">年共育量（张）</td>
                  <td >{{dataModel.AnnualTotalFertility|integer|formatCurrency}}</td>
              </tr>
              <tr >
                  <td class="tableItem">3.大蚕室间数（间）</td>
                  <td >{{dataModel.LargeCocoonNum|integer|formatCurrency}}</td>
                  <td class="tableItem">面积（m2）</td>
                  <td >{{dataModel.LargeCocoonArea|formatCurrency|decimal}}</td>
              </tr>
              <tr >
                  <td class="tableItem">省力化蚕台（套）</td>
                  <td >{{dataModel.LaborSavingRearTable|integer|formatCurrency}}</td>
                  <td class="tableItem">方格簇（张）</td>
                  <td >{{dataModel.GridCluster|integer|formatCurrency}}</td>
              </tr>
              <tr >
                  <td class="tableItem">4.蚕茧收烘站（个）</td>
                  <td >{{dataModel.CocoonStation|integer|formatCurrency}}</td>
                  <td class="tableItem">面积（m2）</td>
                  <td >{{dataModel.CocoonStationArea|formatCurrency|decimal}}</td>
              </tr>
              <tr >
                  <td class="tableItem">季收烘能力（吨）</td>
                  <td >{{dataModel.SeasonalDryCapacity|integer|formatCurrency}}</td>
                  <td class="tableItem">循环烘茧机（套）</td>
                  <td >{{dataModel.CircularDryMachine|integer|formatCurrency}}</td>
              </tr>
              <!-- <tr >
                  <th colspan="4">四、相关企业调查</th>
              </tr>
              <tr >
                  <td>(1)缫丝企业（个）</td>
                  <td colspan="3" >{{dataModel.ReelingEnterprise}}</td>
              </tr>
              <tr >
                  <td>其中：缫丝能力≤5组</td>
                  <td >{{dataModel.ReelingCapacityOne}}</td>
                  <td>≤10组</td>
                  <td >{{dataModel.ReelingCapacityTwo}}</td>
              </tr>
              <tr >
                  <td>≤15组</td>
                  <td >{{dataModel.ReelingCapacityThree}}</td>
                  <td>＞15组</td>
                  <td >{{dataModel.ReelingCapacityFour}}</td>
              </tr>
              <tr >
                  <td>(2)蚕种场（个）</td>
                  <td >{{dataModel.SilkwormField}}</td>
                  <td>生产能力（万张）</td>
                  <td >{{dataModel.ThroughPut}}</td>
              </tr>
              <tr >
                  <td>(3)蚕丝被加工企业（个）</td>
                  <td >{{dataModel.SilkEnterprise}}</td>
                  <td>年加工蚕丝被（吨）</td>
                  <td >{{dataModel.ProcessedSilkQuilt}}</td>
              </tr>
              <tr >
                  <td>(4)其它</td>
                  <td >{{dataModel.Other}}</td>
                  <td>生产能力（单位：）</td>
                  <td >{{dataModel.OtherThroughPut}}</td>
              </tr> -->
          </table>
            <div slot="footer">
                <div style="text-align:left;padding-top:5px;">
                    <Button type="primary" @click="saveSure()">审核通过</Button>
                    <Button type="warning" @click="saveUnSure()">审核不通过</Button>
                </div>
                <Alert style="margin-top:5px;text-align:left;font-size:14px;" banner type="error">
                    <!-- 备注：1、“其它”为表格中没有统计的相关蚕桑制品的生产的企业。 <br/><br/>-->
                    2.此表不需要每年都填报，统计信息有变动时重新填报，系统统计按每个县最后一次填报统计。
                    <span slot="desc">
                    </span>
                </Alert>
            </div>
    </Modal>
    <Modal v-model="ViewShow" :mask-closable="false" width="1200" :styles="{top: '20px'}">
        <p slot="header" class="title">
            <Icon type="ios-paper" size="20"></Icon>
            <span style="font-size: 20px">{{CurrentTableName}}</span>
        </p>
        <p slot="close">
            <Icon type="close-circled" color="red" size=25></Icon>
        </p>
            <table class="reptable2">
              <tr>
                  <th colspan="4" class="tableItemTitle">一、乡镇信息调查</th>
              </tr>
              <tr> 
                  <td  class="tableItem">万亩以上乡（镇）数（个）</td>
                  <td>{{dataModel.NumTownship|integer|formatCurrency}}</td>
                  <td  class="tableItem">分别是</td>
                  <td>{{dataModel.NumTownshipName}}</td>
              </tr>
              <tr>
                  <td  class="tableItem">千亩以上村（委会）（个）</td>
                  <td>{{dataModel.NumVillage|integer|formatCurrency}}</td>
                  <td  class="tableItem">分别是</td>
                  <td>{{dataModel.NumVillageName}}</td>
              </tr>
              <tr>
                  <td  class="tableItem">养蚕户（户）</td>
                  <td>{{dataModel.MulHouseholds|integer|formatCurrency}}</td>
              </tr>
              <tr>
                  <td  class="tableItem">全年养蚕量 (1)＜3张（户）</td>
                  <td>{{dataModel.AnnualSilkwormOne|integer|formatCurrency}}</td>
                  <td  class="tableItem">(2)≤5张（户）</td>
                  <td>{{dataModel.AnnualSilkwormTwo|integer|formatCurrency}}</td>
              </tr>
              <tr>
                  <td   class="tableItem">(3)≤10张（户）</td>
                  <td >{{dataModel.AnnualSilkwormThree|integer|formatCurrency}}</td>
                  <td  class="tableItem">(4)＞10张（户）</td>
                  <td >{{dataModel.AnnualSilkwormFour|integer|formatCurrency}}</td>
              </tr>
              <tr>
                  <th colspan="4" class="tableItemTitle">二、技术人员信息调查</th>
              </tr>
              <tr >
                  <td  class="tableItem">技术人员总数（人）</td>
                  <td >{{dataModel.TecPersonTotalNum|integer|formatCurrency}}</td>
                  <td  class="tableItem">其中：在职在编</td>
                  <td >{{dataModel.TecPersonAllInNum|integer|formatCurrency}}</td>
              </tr>
              <tr >
                  <td  class="tableItem">(1)按性别分:男</td>
                  <td >{{dataModel.ManNum|integer|formatCurrency}}</td>
                  <td  class="tableItem">女</td>
                  <td >{{dataModel.WomanNum|integer|formatCurrency}}</td>
              </tr>
              <tr >
                  <td  class="tableItem">(2)按年龄分:≤30岁</td>
                  <td >{{dataModel.AgeOne|integer|formatCurrency}}</td>
                  <td  class="tableItem">30-40岁</td>
                  <td >{{dataModel.AgeTwo|integer|formatCurrency}}</td>
              </tr>
              <tr >
                  <td  class="tableItem">40-50岁</td>
                  <td >{{dataModel.AgeThree|integer|formatCurrency}}</td>
                  <td  class="tableItem">50岁以上</td>
                  <td >{{dataModel.AgeFour|integer|formatCurrency}}</td>
              </tr>
              <tr >
                  <td  class="tableItem">(3)按学历层次分:硕士及以上</td>
                  <td >{{dataModel.EduLevelOne|integer|formatCurrency}}</td>
                  <td  class="tableItem">本科</td>
                  <td >{{dataModel.EduLeveTwo|integer|formatCurrency}}</td>
              </tr>
              <tr >
                  <td  class="tableItem">大专</td>
                  <td >{{dataModel.EduLevelThree|integer|formatCurrency}}</td>
                  <td  class="tableItem">中专（技校）</td>
                  <td >{{dataModel.EduLevelFour|integer|formatCurrency}}</td>
              </tr>
              <tr >
                  <td  class="tableItem">(4)职称情况:正高</td>
                  <td >{{dataModel.TitleOne|integer|formatCurrency}}</td>
                  <td  class="tableItem">副高</td>
                  <td >{{dataModel.TitleTwo|integer|formatCurrency}}</td>
              </tr>
              <tr >
                  <td  class="tableItem">中职</td>
                  <td >{{dataModel.TitleThree|integer|formatCurrency}}</td>
                  <td  class="tableItem">初职</td>
                  <td >{{dataModel.TitleFour|integer|formatCurrency}}</td>
              </tr>
              <tr class="tableItemTitle">
                  <th colspan="4">三、蚕室、蚕具调查</th>
              </tr>
              <tr >
                  <td  class="tableItem">1.蚕种催青室间数（间）</td>
                  <td >{{dataModel.IncuRoomNum|integer|formatCurrency}}</td>
                  <td  class="tableItem">面积（m2）</td>
                  <td >{{dataModel.IncuRoomArea|decimal|formatCurrency}}</td>
              </tr>
              <tr >
                  <td  class="tableItem">季催青能力（张）</td>
                  <td >{{dataModel.JiCuiqingPower|integer|formatCurrency}}</td>
                  <td  class="tableItem">年催青（张）</td>
                  <td >{{dataModel.YearsOfIncu|integer|formatCurrency}}</td>
              </tr>
              <tr >
                  <td  class="tableItem">2.小蚕共育点（个）</td>
                  <td >{{dataModel.SilkwormSpots|integer|formatCurrency}}</td>
                  <td  class="tableItem">面积（m2）</td>
                  <td >{{dataModel.SilkwormArea|decimal|formatCurrency}}</td>
              </tr>
              <tr >
                  <td  class="tableItem">季共育能力（张）</td>
                  <td >{{dataModel.QuaternaryFertility|integer|formatCurrency}}</td>
                  <td  class="tableItem">年共育量（张）</td>
                  <td >{{dataModel.AnnualTotalFertility|integer|formatCurrency}}</td>
              </tr>
              <tr >
                  <td  class="tableItem">3.大蚕室间数（间）</td>
                  <td >{{dataModel.LargeCocoonNum|integer|formatCurrency}}</td>
                  <td  class="tableItem">面积（m2）</td>
                  <td >{{dataModel.LargeCocoonArea|decimal|formatCurrency}}</td>
              </tr>
              <tr >
                  <td  class="tableItem">省力化蚕台（套）</td>
                  <td >{{dataModel.LaborSavingRearTable|integer|formatCurrency}}</td>
                  <td  class="tableItem">方格簇（张）</td>
                  <td >{{dataModel.GridCluster|integer|formatCurrency}}</td>
              </tr>
              <tr >
                  <td  class="tableItem">4.蚕茧收烘站（个）</td>
                  <td >{{dataModel.CocoonStation|integer|formatCurrency}}</td>
                  <td  class="tableItem">面积（m2）</td>
                  <td >{{dataModel.CocoonStationArea|decimal|formatCurrency}}</td>
              </tr>
              <tr >
                  <td  class="tableItem">季收烘能力（吨）</td>
                  <td >{{dataModel.SeasonalDryCapacity|decimal|formatCurrency}}</td>
                  <td  class="tableItem">循环烘茧机（套）</td>
                  <td >{{dataModel.CircularDryMachine|integer|formatCurrency}}</td>
              </tr>
              <!-- <tr >
                <th colspan="4">四、相关企业调查</th>
              </tr>
              <tr >
                  <td>(1)缫丝企业（个）</td>
                  <td colspan="3" >{{dataModel.ReelingEnterprise}}</td>
              </tr>
              <tr >
                  <td>其中：缫丝能力≤5组</td>
                  <td >{{dataModel.ReelingCapacityOne}}</td>
                  <td>≤10组</td>
                  <td >{{dataModel.ReelingCapacityTwo}}</td>
              </tr>
              <tr >
                  <td>≤15组</td>
                  <td >{{dataModel.ReelingCapacityThree}}</td>
                  <td>＞15组</td>
                  <td >{{dataModel.ReelingCapacityFour}}</td>
              </tr>
              <tr >
                  <td>(2)蚕种场（个）</td>
                  <td >{{dataModel.SilkwormField}}</td>
                  <td>生产能力（万张）</td>
                  <td >{{dataModel.ThroughPut}}</td>
              </tr>
              <tr >
                  <td>(3)蚕丝被加工企业（个）</td>
                  <td >{{dataModel.SilkEnterprise}}</td>
                  <td>年加工蚕丝被（吨）</td>
                  <td >{{dataModel.ProcessedSilkQuilt}}</td>
              </tr>
              <tr >
                  <td>(4)其它</td>
                  <td >{{dataModel.Other}}</td>
                  <td>生产能力（单位：）</td>
                  <td >{{dataModel.OtherThroughPut}}</td>
              </tr> -->
          </table>
        <div slot="footer">
            <Alert style="margin-top:5px;text-align:left;font-size:14px;" banner type="error">
                    <!-- 备注：1、“其它”为表格中没有统计的相关蚕桑制品的生产的企业。<br/><br/> -->
                    2.此表不需要每年都填报，统计信息有变动时重新填报，系统统计按每个县最后一次填报统计。
                    <span slot="desc">
                    </span>
            </Alert>
        </div>
    </Modal>
    <Modal v-model="showAudit" :mask-closable="false" width="500" :styles="{top: '20px'}">
        <p slot="header" class="title">
            <Icon type="ios-paper" size="20"></Icon>
            <span style="font-size: 20px">审核不通过原因</span>
        </p>
        <p slot="close">
            <Icon type="close-circled" color="red" size=25></Icon>
        </p>
        <Input v-model="strMsg" type="textarea" :rows="4" placeholder="请输入不通过原因..."></Input>
        <div slot="footer">
            <Button type="primary" @click="sureUnSure()">确定</Button>
            <Button type="ghost" @click="cancelUnSure()" style="margin-left: 8px">取消</Button>
        </div>
    </Modal>
  </div>
</template>
<script>
export default {
    data() {
        return {
            datas: {},//table数据对象
            dataIds: [],
            showAudit: false,
            strMsg: '',
            CurrentTableName:'表7县生产信息调查',
            Id: '',
            AreaList: [],
            CurrentYear: this.GetCurrentYear(),//当前年度
            userinfo: this.GetlocaStorage("CSuserinfo"),
            TableCodeList: this.GetGroupDict("ReportTableName"),//表名称
            CreateYearList: this.GetGroupDict("ReportYear"),//上报年份
            CycleList: this.GetGroupDict("ReportCycle"),//周期
            ReStatusList:this.GetGroupDict("ReportStatus"),//报表状态
            pageSizeOpts: [20, 40, 50],//默认分页最大设置
            showType: false,//编辑框弹出状态
            ViewShow: false,
            selectTabName: '',
            TabTitleList: [],//tab选项卡列表
            //查询模型：根据需求删除不不要查询条件
            searchModel: {
                ReportCode: 'MulProdInfoChart',
                FillInYear: '',
                TimesType: '',
                AreaCode: this.GetlocaStorage("CSuserinfo").AreaCode,
                Status:'',
                StatusTwo:'3',
                PageNumber: 1, PageSize: 20
            },
            dataModel: {//编辑模型
                Id: 0,
                ReportId: '',
                NumTownship: '',
                NumTownshipName: '',
                NumVillage: '',
                NumVillageName: '',
                MulHouseholds: '',
                AnnualSilkwormOne: '',
                AnnualSilkwormTwo: '',
                AnnualSilkwormThree: '',
                AnnualSilkwormFour: '',
                TecPersonTotalNum: '',
                TecPersonAllInNum: '',
                ManNum: '',
                WomanNum: '',
                AgeOne: '',
                AgeTwo: '',
                AgeThree: '',
                AgeFour: '',
                EduLevelOne: '',
                EduLevelTwo: '',
                EduLevelThree: '',
                EduLevelFour: '',
                TitleOne: '',
                TitleTwo: '',
                TitleThree: '',
                TitleFour: '',
                IncuRoomNum: '',
                IncuRoomArea: '',
                JiCuiqingPower: '',
                YearsOfIncu: '',
                SilkwormSpots: '',
                SilkwormArea: '',
                QuaternaryFertility: '',
                AnnualTotalFertility: '',
                LargeCocoonNum: '',
                LargeCocoonArea: '',
                LaborSavingRearTable: '',
                GridCluster: '',
                CocoonStation: '',
                CocoonStationArea: '',
                SeasonalDryCapacity: '',
                CircularDryMachine: '',
                ReelingEnterprise: '',
                ReelingCapacityOne: '',
                ReelingCapacityTwo: '',
                ReelingCapacityThree: '',
                ReelingCapacityFour: '',
                SilkwormField: '',
                ThroughPut: '',
                SilkEnterprise: '',
                ProcessedSilkQuilt: '',
                Other: '',
                OtherThroughPut: ''
            },
            ctx: this,//table数据上下文
            columnsList: [
                { title: "报表名称", key: "ReportName", },
                // { title: "填报年度", key: "FillInYearName", },
                // { title: "属行政区划", key: "AreaCodeName",  },
                // { title: "填报时间周期", key: "TimesTypeName",  },
                {
                    title: "报表状态", key: "StatusName", width:150,
                    render: (h, params) => {
                        switch (params.row.Status * 1) {
                            case 0: //审核未通过
                                return h('span', { class: { Error: true } }, params.row.StatusName);
                            case 1: //未填写
                                return h('span', { class: { NoReport: true } }, params.row.StatusName);
                            case 2: //已填写
                                return h('span', { class: { AlreadyReport: true } }, params.row.StatusName);
                            case 3: //已上报
                                return h('span', { class: { UpReport: true } }, params.row.StatusName);
                            case 4: //审核通过
                                return h('span', { class: { Success: true } }, params.row.StatusName);
                            case 5: //锁定
                                return h('span', { class: { error: true } }, params.row.StatusName);
                            default:
                                return h('span', { class: { Default: true } }, params.row.StatusName);
                        }
                    }
                },
                { title: "新增时间", key: "StrAddTime",width:180 },
                // { title: "填报时间", key: "StrUpdateTime", },
                {
                    title: "操作", key: "Id", width: 260, align: 'center',
                    render: (h, params) => {
                        return h('div', [
                            h('Button', {
                                class: { ieditColor: true },
                                props: {
                                    type: 'ghost', size: 'small', icon: 'ios-paper-outline'
                                },
                                style: {
                                    marginleft: '5px'
                                },
                                on: {
                                    click: () => {
                                        this.showInfo(params.row.Id, params.row.ReportCode, params.row.ReportName)
                                    }
                                }
                            }, '查看'),
                            h('Button', {
                                class: { irefreshColor: true },
                                props: {
                                    type: 'ghost', size: 'small', icon: 'network', disabled: params.row.Status == 4 || params.row.Status < 3
                                },
                                style: {
                                    marginleft: '5px'
                                },
                                on: {
                                    click: () => {
                                        this.editInfo(params.row.Id, params.row.ReportCode, params.row.ReportName)
                                    }
                                }
                            }, '审核'),
                            h('Button', {
                                class: { ideleteColor: true },
                                props: {
                                    type: 'ghost', size: 'small', icon: 'ios-undo',disabled: params.row.Status < 4
                                },
                                style: {
                                    marginleft: '5px'
                                },
                                on: {
                                    click: () => {
                                        this.unReview(params.row.Id)
                                    }
                                },
                                directives: [
                                    {
                                        name: 'omg-operation',
                                        value: { op: "unreview" }
                                    }
                                ]
                            }, '取消审核'),
                        ])
                    }
                }
            ],
            clientHeight: window.innerHeight - 260,//表格默认高度
        }
    },
    mounted() {
        //table高度计算方法
        const that = this;
        window.onresize = () => {
            return (() => {
                that.clientHeight = window.innerHeight - 260;
            })()
        };
    },
    methods: {
        //获取当前地区包含区(县)市(州)
        SearchAreaList() {
            var areaCode = this.userinfo.AreaCode;
            var areaList=[];
            if (areaCode != '530000000000' && areaCode != null) {
                var item = this.GetlocaStorage("areatreelist")[0];
                for (var i = 0; i < item.children.length; i++) {
                    if (item.children[i].value == areaCode) {
                        areaList.push(item.children[i]);
                    }
                }
            } else {

                areaList = this.GetlocaStorage("areatreelist");
            }
            this.AreaList=areaList[0].children;
        },
        upReport(id) {
            var self = this;
            self.$Modal.confirm({
                title: '提示信息',
                content: '<p>是否确认上报？</p>',
                onOk: () => {
                    var model = new Object();
                    model.Id = id;
                    model.reportType = '3';
                    model.strMsg = '';
                    this.$http.post("Report/PostUpStatus", model).then(
                        function (res) {
                            if (res.data.status == 1) {
                                self.$Notice.success({ title: '已上报！', desc: false });
                                self.getPageData();
                            }
                            else {
                                self.$Modal.error({ title: "提示信息", content: "数据删除失败!!!" });
                            }
                        }
                    );
                }
            });
        },
        getTab(name) {
            this.selectTabName = name;
        },
        //查看报表
        showInfo(id, reportCode,reportName) {
            var self = this;
            self.CurrentTableName=reportName;
            this.$http.get("Report", { params: { id: id, reportCode: reportCode } }).then(//获取数据编辑项的值
                function (res) {
                    switch (res.data.list.status) {
                        case 1:
                            //self.initTab(self, res.data.list.model);
                            self.dataModel = res.data.list.model;
                            self.ViewShow = true;
                            break;
                        case 0:
                            self.$Modal.error({ title: "提示信息", content: "编辑数据加载失败!!!" });
                            break;
                        case -1:
                            self.$Modal.error({ title: "提示信息", content: "编辑数据加载失败!!!" });
                            break;
                    }
                }
            );
        },
        //获取当前页码
        getPageNumber(pageIndex) {
            this.searchModel.PageNumber = pageIndex;
            this.getPageData();
        },
        //获取当前分页大小
        getPageSize(pageSize) {
            this.searchModel.PageSize = pageSize;
            this.getPageData();
        },
        //获取this.datas: {},//table数据对象
        getPageData() {
            var self = this;
            //判断是否为省级用户
            if(self.userinfo.AreaCode=="530000000000"&&self.userinfo.Account =="530000"){
                self.searchModel.Status = self.searchModel.StatusTwo;
            }else{
                self.searchModel.Status = self.searchModel.Status;
            }
            if (self.searchModel.FillInYear != null && self.searchModel.FillInYear != '') {
                self.searchModel.FillInYear = self.searchModel.FillInYear;//获取当前系统年份
            } else {
                self.searchModel.FillInYear = self.CurrentYear + '年'; //获取填报年度-----数据字典值
            }
            self.$http.post('Report/PostReviewPageList', this.searchModel).then(function (res) {
                if (res.data.status === 1) {
                    self.datas = res.data;
                }
                else {
                    self.$Modal.error({ title: '提示信息', content: res.data.message });
                }
            });
        },
        //编辑获取对象传入id
        editInfo(id, reportCode,reportName) {//编辑
            var self = this;
            self.CurrentTableName=reportName;
            this.Id = id;
            this.$http.get("Report", { params: { id: id, reportCode: reportCode } }).then(//获取数据编辑项的值
                function (res) {
                    switch (res.data.list.status) {
                        case 1:
                            self.dataModel = res.data.list.model;
                            self.modalShow();
                            break;
                        case 0:
                            self.$Modal.error({ title: "提示信息", content: "编辑数据加载失败!!!" });
                            break;
                        case -1:
                            self.$Modal.error({ title: "提示信息", content: "编辑数据加载失败!!!" });
                            break;
                    }
                }
            );
        },
        initTab(self, datas) {
            self.TabTitleList = [];
            for (var i = 0; i < datas.length; i++) {
                if (!self.checkTab(datas[i].SortCode, self)) {
                    var item = new Object();
                    item.SortCode = datas[i].SortCode;
                    item.SortName = datas[i].SortName;
                    item.list = [];
                    for (var j = 0; j < datas.length; j++) {
                        if (datas[j].SortCode == datas[i].SortCode) {
                            if (!self.checkItem(item.list, datas[j].ItemCode)) {
                                item.list.push(datas[j]);
                            }
                        }
                    }
                    self.TabTitleList.push(item);
                }
            }
            return self.TabTitleList;
        },
        checkTab(SortCode, self) {
            var res = false;
            for (var i = 0; i < self.TabTitleList.length; i++) {
                if (self.TabTitleList[i].SortCode == SortCode) {
                    res = true;
                }
            }
            return res;
        },
        checkItem(datas, ItemCode) {
            var res = false;
            for (var i = 0; i < datas.length; i++) {
                if (datas[i].ItemCode == ItemCode) {
                    res = true;
                }
            }
            return res;
        },
        //审核
        save(model) {
            var self = this;
            this.$http.post("Report/PostUpStatus", model).then(
                function (res) {
                    if (res.data.status == 1) {
                        self.$Notice.success({ title: '审核完成!', desc: false });
                        self.getPageData();
                        self.strMsg = '';
                        self.modalHide();
                    }
                    else {
                        self.$Modal.error({ title: "提示信息", content: "数据审核失败!!!" });
                    }
                });
        },
        saveSure() {
            var model = new Object();
            model.Id = this.Id;
            model.reportType = '4';
            model.strMsg = '';
            this.save(model);
            this.modalHide();
        },
        //审核未通过
        saveUnSure() {
            var self = this;
            this.showAudit = true;
        },
        sureUnSure() {
            var self = this;
            this.showAudit = false;
            var model = new Object();
            model.Id = self.Id;
            model.reportType = '0';
            model.strMsg = this.strMsg;
            this.save(model);
        },
        cancelUnSure() {
            this.showAudit = false;
            //this.modalHide();
            this.strMsg = '';
        },
        //省级取消审核
        unReview(id, reportCode) {
            var model = new Object();
            model.Id = id;
            model.reportType = '0';
            model.strMsg = '省级已取消审核!';
            this.save(model);
        },
        findItemList(tabname) {
            var list = [];
            for (var i = 0; i < this.TabTitleList.length; i++) {
                if (this.TabTitleList[i].SortCode == tabname) {
                    list = this.TabTitleList[i].list;
                    break;
                }
            }
            return list;
        },
        //编辑框打开
        modalShow() {
            this.showType = true;
        },
        //编辑框关闭
        modalHide() {
            this.showType = false;
        },
        //取消方法
        cancel() {
            this.showType = false;//关闭modal
            this.TabTitleList = [];
        },
        //重置model
        restModel(modelname) {
            this.$refs[modelname].resetFields();//重置model
        },
        //查询行政区划级联选择
        SearchCascaderChange(value, selectedData) {
            const index = value.length - 1;
            this.searchModel.AreaCode = value[index];
        },
    },
    //创建Vue页面方法
    created: function () {
        //创业Vue前调用获取this.datas: {},//table数据对象
        this.getPageData();
        this.SearchAreaList();
    },
    watch: {
        //需要监听的在此处新增监听对象
    }
}
</script>
